package com.hy.demo.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

import com.hy.frame.util.LogUtil;

public class MixtureRecyclerView extends RecyclerView {
    private final static String TAG = "MixtureRecyclerView";

    public MixtureRecyclerView(@NonNull Context context) {
        super(context);
    }

    public MixtureRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public MixtureRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onScrollChanged(int l, int t, int oldl, int oldt) {
        super.onScrollChanged(l, t, oldl, oldt);
        int scrollY = getScrollY();
        LogUtil.d(TAG, String.format("%s: %sx%s,old=%sx%s,scrollY=%s,scrollY=%s", "onScrollChanged", l, t, oldl, oldt, scrollY, getTop()));

    }
}
